package com.atbun.aclservice.service;

import com.alibaba.fastjson.JSONObject;
import com.atbun.aclservice.entity.AclPermission;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 权限 服务类
 * </p>
 *
 * @author testjava
 * @since 2020-05-23
 */
public interface PermissionService extends IService<AclPermission> {
//    获取全部菜单
    List<AclPermission> indexAllPermission();
// 递归删除菜单
    void deletePermission(String id);
//给角色分配权限
    void saveRolePermissionRealtionShip(String roleId, String[] permissionId);
//通过角色id获取菜单
    List<AclPermission> selectAllMenu(String roleId);

//    根据用户id查询权限信息
    List<String> selectPermissionValueByUserId(String userId);
//    根据用户id查询菜单
    List<JSONObject> selectPermissionByUserId(String userId);
}
